package com.ruoyi.aftserv.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.aftserv.mapper.AfterServiceApplyMapper;
import com.ruoyi.aftserv.domain.AfterServiceApply;
import com.ruoyi.aftserv.service.IAfterServiceApplyService;
import com.ruoyi.common.core.text.Convert;

/**
 * 报名方案管理Service业务层处理
 * 
 * @author 张艳羽
 * @date 2024-08-21
 */
@Service
public class AfterServiceApplyServiceImpl implements IAfterServiceApplyService 
{
    @Autowired
    private AfterServiceApplyMapper afterServiceApplyMapper;

    /**
     * 查询报名方案管理
     * 
     * @param id 报名方案管理主键
     * @return 报名方案管理
     */
    @Override
    public AfterServiceApply selectAfterServiceApplyById(Long id)
    {
        return afterServiceApplyMapper.selectAfterServiceApplyById(id);
    }

    /**
     * 查询报名方案管理列表
     * 
     * @param afterServiceApply 报名方案管理
     * @return 报名方案管理
     */
    @Override
    public List<AfterServiceApply> selectAfterServiceApplyList(AfterServiceApply afterServiceApply)
    {
        return afterServiceApplyMapper.selectAfterServiceApplyList(afterServiceApply);
    }

    /**
     * 新增报名方案管理
     * 
     * @param afterServiceApply 报名方案管理
     * @return 结果
     */
    @Override
    public int insertAfterServiceApply(AfterServiceApply afterServiceApply)
    {
        afterServiceApply.setCreateTime(DateUtils.getNowDate());
        return afterServiceApplyMapper.insertAfterServiceApply(afterServiceApply);
    }

    /**
     * 修改报名方案管理
     * 
     * @param afterServiceApply 报名方案管理
     * @return 结果
     */
    @Override
    public int updateAfterServiceApply(AfterServiceApply afterServiceApply)
    {
        afterServiceApply.setUpdateTime(DateUtils.getNowDate());
        return afterServiceApplyMapper.updateAfterServiceApply(afterServiceApply);
    }

    /**
     * 批量删除报名方案管理
     * 
     * @param ids 需要删除的报名方案管理主键
     * @return 结果
     */
    @Override
    public int deleteAfterServiceApplyByIds(String ids)
    {
        return afterServiceApplyMapper.deleteAfterServiceApplyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除报名方案管理信息
     * 
     * @param id 报名方案管理主键
     * @return 结果
     */
    @Override
    public int deleteAfterServiceApplyById(Long id)
    {
        return afterServiceApplyMapper.deleteAfterServiceApplyById(id);
    }
}
